package dfbz.homework8;

import java.util.Comparator;

public class Student implements Comparator<Student> {
    private String name;
    private Double score;

    public Student() {
    }

    public Student(String name, Double score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", score=" + score +
                '}';
    }


    @Override
    public int compare(Student o1, Student o2) {
        int result= (int) (o1.getScore()-o2.getScore());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        return false;
    }
}
